<template>
  <div>
    <!-- <KeepAlive></KeepAlive> -->
    <input type="radio" :value="ChildOne" v-model="currentComp">One
    <input type="radio" :value="ChildTwo" v-model="currentComp">Two

    <!-- <KeepAlive include="ChildOne,ChildTwo" >
      <component :is="currentComp"></component>
    </KeepAlive> -->
    <!-- <KeepAlive :include="/ChildOne/" >
      <component :is="currentComp"></component>
    </KeepAlive> -->
    <KeepAlive :include="['ChildOne','ChildTwo']" :max="3">
      <component :is="currentComp"></component>
    </KeepAlive>
   
  </div>
</template>
<script setup>
import { shallowRef } from 'vue';
import ChildOne from './components/ChildOne.vue';
import ChildTwo from './components/ChildTwo.vue';
const currentComp = shallowRef(ChildOne)
</script>